<?php
if(isset($_REQUEST['cate_id'])){
	$v_cate_id=$_REQUEST['cate_id'];
}
if(_is_sqlserver()){
	// Lay so luong tthc co trong linh vuc
	$cmd = @mssql_init("ONEGATE_AFCountByCate", $conn);
	@mssql_bind($cmd, "@p_cate_id",$v_cate_id, SQLINT4);
	$result = @mssql_execute($cmd);
	$arr_count = _get_row_to_array($result);
	@mssql_free_result($result);
	
	$v_total_af =$arr_count['0']['0'];

	//Lay danh sach CQHC 
	$cmd = @mssql_init("ONEGATE_AFAgencyGetAllByCate",$conn);
	@mssql_bind($cmd,"@p_cate_id",$v_cate_id,SQLINT4);	
	$rs_all_agency = @mssql_execute($cmd);
	$arr_all_agency = _get_row_to_array($rs_all_agency); 
	@mssql_free_result($rs_all_agency);
}
?>